<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"> 

	<h:head>
		<title>EL Operators</title>
		<link href="../08/css/styles.css" rel="stylesheet" type="text/css" />
	</h:head>
	<body> 
		<table border="5" align="center">
			<tr>
				<th class="title">El Operators</th>
			</tr>
		</table>
		<br/>
		<table border="1" align="center">
			<tr>
				<th colspan="2">Arithmetic Operators</th>
				<th colspan="2">Relational Operators</th>
			</tr>
			<tr>
				<th>Expression</th>
				<th>Result</th>
				<th>Expression</th>
				<th>Result</th>
			</tr>
			<tr align="center">
				<td>\#{3+2-1}</td><td>#{3+2-1}</td>
				<td>\#{1 lt 2}</td><td>#{1 lt 2}</td>
			</tr>
			<tr align="center">
				<td>\#{"1"+2}</td><td>#{"1"+2}</td>
				<td>\#{"a" lt "b"}</td><td>#{"a" lt "b"}</td>
			</tr>
			<tr align="center">
				<td>\#{1 + 2*3 + 3/4}</td><td>#{1 + 2*3 + 3/4}</td>
				<td>\#{2/3 ge 3/2</td><td>#{2/3 ge 3/2}</td>
			</tr>
			<tr align="center">
				<td>\#{3%2}</td><td>#{3%2}</td>
				<td>\#{ 3/4 == 0.75}</td><td>#{ 3/4 == 0.75}</td>
			</tr>
			<tr align="center">
				<!-- div and mod are alternatives to / and % -->
				<td>\#{( 8 div 2) mod 3}</td><td>#{(8 div 2 ) mod 3 }</td>
				<!-- Compares with "equals" but returns false for null -->
				<td>\#{null == "test"}</td><td>#{null == "test"}</td>
			</tr>
			<tr>
				<th colspan="2">Logical Operators</th>
				<th colspan="2"><code>empty</code> Operator</th>
			</tr>
			<tr>
				<th>Expression</th>
				<th>Result</th>
				<th>Expression</th>
				<th>Result</th>
			</tr>
			<tr align="center" >
				<td>\#{(1 lt 2 ) and ( 4 lt 3 )}</td><td>#{(1 lt 2 ) and ( 4 lt 3 )}</td>
				<td>\#{ empty "" }</td><td>#{ empty "" }</td> <!-- Empty string -->
			</tr>
			<tr align="center">
				<td>\#{( 1 lt 2 ) or ( 4 lt 3 )}</td><td>#{ ( 1 lt 2 ) or ( 4 lt 3 )}</td>
				<td>\#{ empty null }</td><td>#{empty null}</td> <!-- null -->
			</tr>
			<tr align="center">
				<td>\#{!(1 lt 2 )}</td><td>#{!(1 lt 2 )}</td>
				<td>\#{!(1 lt 2 )}</td><td>#{!(1 lt 2 )}</td>
			</tr>
		</table>
	</body> 
</html>
